﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Hive.Core.Model
{
    /// <summary>
    /// A package is a logical unit of code which may be spread across multiple branches.
    /// </summary>
    public interface IPackage
    {
        /// <summary>
        /// Gets the hive to which this package belongs.
        /// </summary>
        IHive Hive { get; }

        /// <summary>
        /// Gets the name of the package.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets the package directory.
        /// </summary>
        DirectoryInfo Directory { get; }

        /// <summary>
        /// Gets the list of all package branches.
        /// </summary>
        /// <returns>The list of package branches.</returns>
        IList<IPackageBranch> GetBranches();

        /// <summary>
        /// Gets the package branch with the specified name.
        /// </summary>
        /// <param name="branchName">The branch name.</param>
        /// <returns>The package branch.</returns>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="branchName"/> is null.</exception>
        IPackageBranch GetBranch(string branchName);
    }
}
